package com.xxg.renrenshoppingcart.dao;

import com.xxg.renrencommon.domain.dao.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * RenrenShopShopDao继承基类
 */
@Mapper
@Repository
public interface RenrenShopShopDao extends BaseMapper<RenrenShopShop, Integer> {
    @Select({"<script>",
            "select id, type, parent_id as parentId,user_id as userId,name,logo,status, ",
            "is_deleted as isDeleted, is_trial as isTrial",
            "from renren_shop_shop where id in ",
            "<foreach collection='ids' item='id' open='(' separator=',' close=')'>",
            "#{id}",
            "</foreach>",
            "</script>"})
    List<RenrenShopShop> selectByIds(List<Integer> ids);
}